<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Preferences | CustomBlocker</title>
    <link rel="stylesheet" type="text/css" href="../css/pref/list_rules.css">
    <link rel="stylesheet" type="text/css" href="../css/pref/help.css">
    <link rel="stylesheet" type="text/css" href="../css/rule_editor.css">
    <link rel="stylesheet" type="text/css" href="../css/rule_editor_common.css">
    <link rel="stylesheet" type="text/css" href="../css/keywords.css">
    <script type="text/javascript" src="../src/CustomBlocker.js"></script>
    <script type="text/javascript" src="../src/pref/list_rules.js"></script>
    <script type="text/javascript" src="../src/word_group_picker.js"></script>
    <script type="text/javascript" src="../src/pref/word_editor.js"></script>
    <script type="text/javascript" src="../src/pref/list_rules.js"></script>
  </head>
  <body>
    <header class="header">
      <h1 class="header__title"><img src="../img/top_title.png" alt="CustomBlocker for Google Chrome"></h1>
      <div class="header__donate"><a class="custom_filter_localize_donate" id="donate_link" href="#donate">Donate</a></div>
      <nav class="header__tabs">
        <div class="header__tabs__tab header__tabs__tab--selected"><a class="header__tabs__tab__link" href="index.html?p=p4"><span class="custom_filter_localize_prefTitle">Manage Rules</span></a></div>
        <div class="header__tabs__tab"><a class="header__tabs__tab__link" id="word_group_link" href="word_group.html"><span class="custom_filter_localize_word_group">Word Groups</span></a></div>
        <div class="header__tabs__tab"><a class="header__tabs__tab__link" id="install_link" href="welcome_install_cn.html"><span class="custom_filter_localize_install">屏蔽常用网站</span></a></div>
        <div class="header__tabs__tab"><a class="header__tabs__tab__link" id="sync_link" href="sync.html"><span class="custom_filter_localize_sync">同步到Gitee</span></a></div>
        <div class="header__tabs__tab"><a class="header__tabs__tab__link" id="help_link" href="help_en.html"><span class="custom_filter_localize_help">Help</span></a></div>
      </nav>
    </header>
    <div id="prefMain">
      <div id="manualMigrationSection" style="display:none;margin:1em;padding:1em;background-color:#ffd"><span class="custom_filter_localize_migrationFlagNotFound"></span><a id="manualMigrationLink" href="#">[<span class="custom_filter_localize_migrationLink"></span>]</a></div>
      <div class="menu"><span class="custom_filter_localize_showBadge">Show number of blocked elements on app icon</span> 
        <input id="buttonBadgeOn" type="radio" name="badge_config">
        <label for="buttonBadgeOn">ON</label> 
        <input id="buttonBadgeOff" type="radio" name="badge_config">
        <label for="buttonBadgeOff">OFF</label>
      </div>
      <div>
        <input id="search_box" type="text">
      </div>
      <!--  List & Editor-->
      <div class="editor-frame">
        <div class="editor-frame__editor">
          <div class="rule-editor-body customblocker_rule_dialog" id="rule_editor_body">
            <section class="section rule-editor-body__section">
              <div class="input_section">
                <div class="label"><span class="custom_filter_localize_sectionRuleTitle">Title</span></div>
                <input id="rule_editor_title" type="text">
              </div>
            </section>
            <section class="section rule-editor-body__section">
              <h2><span class="custom_filter_localize_sectionSite text">Site</span></h2>
              <div class="input_section">
                <div class="label"><span class="custom_filter_localize_url">URL</span></div>
                <input id="rule_editor_site_regexp" type="text">
              </div>
              <div>
                <input id="specify_url_by_regexp_checkbox" type="checkbox">
                <label for="specify_url_by_regexp_checkbox">使用正则表达式</label>
              </div>
              <div class="input_section">
                <div class="label"><span class="custom_filter_localize_exampleUrl">Example URL</span></div>
                <input id="rule_editor_example_url" type="text">
              </div>
              <div class="input_section" style="display: none">
                <div class="label"><span class="custom_filter_localize_description">Description</span></div>
                <input id="rule_editor_site_description" type="text">
              </div>
              <div class="description"><span class="custom_filter_localize_descriptionSite">This rule is applied on matched sites.</span></div>
            </section>
            <section class="section rule-editor-body__section" style="position: relative !important">
              <h2><span class="custom_filter_localize_sectionHide text">Elements to Hide</span></h2>
              <div class="input_section" id="rule_editor_section_hide_xpath">
                <div class="label">XPath</div>
                <input id="rule_editor_hide_block_xpath" type="text">
              </div>
              <div class="input_section" id="rule_editor_section_hide_css">
                <div class="label">CSS Selector</div>
                <input id="rule_editor_hide_block_css" type="text">
              </div>
              <div class="input_section" style="display: none">
                <div class="label"><span class="custom_filter_localize_description">Description</span></div>
                <input id="rule_editor_hide_block_description" type="text">
              </div>
              <div class="selector_radio_container">
                <input id="rule_editor_radio_hide_xpath" type="radio" name="rule_editor_radio_hide">
                <label for="rule_editor_radio_hide_xpath">XPath</label>
                <input id="rule_editor_radio_hide_css" type="radio" name="rule_editor_radio_hide">
                <label for="rule_editor_radio_hide_css">CSS</label>
              </div>
              <div class="description"><span class="custom_filter_localize_descriptionHide">Matched elements will disappear if they meet the condition.</span></div>
            </section>
            <section class="section rule-editor-body__section" style="position: relative !important">
              <h2><span class="custom_filter_localize_condition text">Search Region</span></h2>
              <div>
                <input id="rule_editor_block_anyway" type="radio" name="rule_editor_block_anyway">
                <label class="custom_filter_localize_blockAnyway" for="rule_editor_block_anyway">Block Anyway</label>
              </div>
              <div>
                <input id="rule_editor_block_anyway_false" type="radio" name="rule_editor_block_anyway">
                <label class="custom_filter_localize_filterWithKeywords" for="rule_editor_block_anyway_false">Filter with keywords</label>
              </div>
              <div id="rule_editor_hide_detail">
                <div class="input_section" id="rule_editor_section_search_xpath">
                  <div class="label">XPath</div>
                  <input id="rule_editor_search_block_xpath" type="text">
                </div>
                <div class="input_section" id="rule_editor_section_search_css">
                  <div class="label">CSS Selector</div>
                  <input id="rule_editor_search_block_css" type="text">
                </div>
                <div class="input_section" style="display: none">
                  <div class="label"><span class="custom_filter_localize_description">Description</span></div>
                  <input id="rule_editor_search_block_description" type="text">
                </div>
                <div class="selector_radio_container">
                  <input id="rule_editor_radio_search_xpath" type="radio" name="rule_editor_radio_search">
                  <label for="rule_editor_radio_search_xpath">XPath</label>
                  <input id="rule_editor_radio_search_css" type="radio" name="rule_editor_radio_search">
                  <label for="rule_editor_radio_search_css">CSS</label>
                </div>
                <div class="description"><span class="custom_filter_localize_descriptionSearch">如果要搜索元素的内容包含关键词，规则生效.</span></div>
                <h3><span class="custom_filter_localize_sectionWord">Words</span></h3>
                <div>
                  <input id="rule_editor_keyword" type="text">
                  <input class="uiButton" id="rule_editor_add_keyword_button" type="button" value="ADD">
                </div>
                <div>
                  <!--  Complete Matching-->
                  <input id="rule_editor_keyword_complete_matching_checkbox" type="checkbox">
                  <label for="rule_editor_keyword_complete_matching_checkbox"><span class="custom_filter_localize_complete_matching">Complete Match</span></label>
                  <!--  RegExp-->
                  <input id="rule_editor_keyword_regexp_checkbox" type="checkbox">
                  <label for="rule_editor_keyword_regexp_checkbox"><span class="custom_filter_localize_regex">RegEx</span></label>
                  <!--  Ignore Case-->
                  <input id="rule_editor_keyword_case_sensitive_checkbox" type="checkbox">
                  <label for="rule_editor_keyword_case_sensitive_checkbox"><span class="custom_filter_localize_case_sensitive">Case Sensitive</span></label>
                  <!--  Include link URL-->
                  <input id="rule_editor_keyword_include_href_checkbox" type="checkbox" style="display: none;">
<!--                  <label for="rule_editor_keyword_include_href_checkbox"><span class="custom_filter_localize_include_href">Include URL</span></label>-->
                </div>
                <div class="smart_rule_editor_keywords" id="rule_editor_keywords"></div>
                <h3>Word Groups</h3>
                <div id="rule_editor_keyword_groups"></div>
                <div>
                  <select id="select_word_groups">
                    <option>----</option>
                  </select><a class="custom_filter_localize_manageGroups" href="word_group.html">Manage groups</a>
                </div>
              </div>
            </section>
            <div id="rule_editor_alert">
              <!--  Alert Message-->
            </div>
            <div class="bottom_button_container">
              <input class="uiButton" id="rule_editor_save_button" type="button" value="Save">
              <div style="display:none">
                <input id="rule_editor_save_merge_checkbox" type="checkbox">merge
              </div>
            </div>
          </div>
          <!--  rule_editor_body-->
        </div>
        <div class="editor-frame__list">
          <ul class="rule-list" id="js_rule-list"></ul>
          <div id="ruleEmptyAlert"><span class="custom_filter_localize_descriptionEmpty">There is no rule. Make rules for your favorite sites.</span>
            <div><a id="help_link_empty" href="help.html"><span class="custom_filter_localize_helpEmpty">How to make rules</span></a></div>
          </div>
          <div class="rule-count"><span id="activeRuleCount">-</span> /<span id="totalRuleCount">-</span><span class="custom_filter_localize_ruleSuffix">Rules</span></div>
          <div style="margin-top: 10px">
            <input class="uiButton" id="rule_editor_export_button" type="button" value="Export">


          </div>

          <div style="margin-top: 10px;">
            <textarea rows="10" cols="30" id="rule_editor_import_text"></textarea>

            <input class="uiButton" id="rule_editor_import_button" type="button" value="Import">

          </div>
        </div>
      </div>
    </div>
    <script type="text/javascript" src="../src/analytics.js"></script>
  </body>
</html>